﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.Entity;
using COM.OA.BLL;

public partial class linminchao_bbs_lt_addHF : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        users loginuser = Session["loginuser"] as users;
        if (loginuser == null)
        {
            this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../../login.aspx"));
        }
        else
        {
            this.Label1.Text = this.Request.QueryString["zhuti"];

        }

    }
    protected void submit1_ServerClick(object sender, EventArgs e)
    {
        users loginuser = Session["loginuser"] as users;
        bbsrevert br = new bbsrevert();
        br.br_bbs_id = Int32.Parse(this.Request.QueryString["bbs_id"]);
        br.br_revertcontent = this.FreeTextBox1.Text;
        br.br_u_id = loginuser.u_id;
        br.br_reverttime = DateTime.Now;
        int i = bbsrevertBLL.Insert(br);
        if (i < 0)
        {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "添加回复成功！"));
            this.Response.Write(string.Format(GetRedirect.REDIRECT, "lt_lookOne.aspx?bbs_id=" + this.Request.QueryString["bbs_id"]));
        }
        else
        {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "添加回复失败！"));
        }
    }
}
